package com.ngc.mall.controller;

import com.ngc.mall.common.configure.response.ResponseResult;
import com.ngc.mall.domain.SkuDomain;
import com.ngc.mall.service.ISkuService;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("sku")
public class SkuController {

    @Resource
    private ISkuService iSkuService;

    @GetMapping("")
    @ApiOperation("根据ids获取sku")
    public ResponseResult<List<SkuDomain>> getListByIds(@RequestParam(value="ids") List<Long> ids){
        System.out.println(ids);
            return ResponseResult.success(iSkuService.findByIdList(ids));
    }


}
